//
//  PayLatestDetailTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/8/28.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "PayLatestDetailTableViewCell.h"

@implementation PayLatestDetailTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = SFM242;
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.bgview];
    [self.bgview addSubview:self.titleLabel];
    [self.bgview addSubview:self.detailLabel];
}

-(UIView *)bgview
{
    if (_bgview == nil) {
        _bgview = [[UIView alloc] initWithFrame:CGRectMake(25, 0, WIDTH - 50, 32)];
        _bgview.backgroundColor = SFMWhiteColor;
    }
    return _bgview;
}

-(UILabel *)titleLabel
{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 6, 73, 20)];
        _titleLabel.font = font(12);
        _titleLabel.textColor = SFM51;
        _titleLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _titleLabel;
}

-(UILabel *)detailLabel
{
    if (_detailLabel == nil) {
        _detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(93, 6, WIDTH - 143, 20)];
        _detailLabel.font = font(12);
        _detailLabel.textColor = SFMColor(109, 123, 140);
        _detailLabel.textAlignment = NSTextAlignmentLeft;
    }
    return _detailLabel;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
